<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item of banner" :key="item.id">
        <img class="swiper_img" :src="item.imageUrl" alt="" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  data() {
    return {
      banner: [],
    };
  },
  methods: {
    handleClose() {
      console.log("close event");
    },
  },
  mounted() {
    this.$http.get("http://47.108.197.28:3000/banner").then((res) => {
      console.log(res.data.banners);
      this.banner = res.data.banners;
    });
  },
};
</script> 

<style>
  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    width: 100%;
    height: 5.7733rem;
    text-align: center;
    background-color: #fff;
  }
.swiper_img {
  width: 100%;
  height: 100%;
}
.van-swipe__indicators{
  bottom: 1.16rem;
}
</style>